<%@page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="com.google.appengine.api.users.UserService"%>
<%@page import="com.google.appengine.api.users.UserServiceFactory"%>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>CBlog</title>
    <link type="text/css" style="sheet" rel="stylesheet" href="/style/css/layout.css"/>
    <link type="text/css" style="sheet" rel="stylesheet" href="/components/syntax/styles/shCore.css"/>
    <link type="text/css" style="sheet" rel="stylesheet" href="/components/syntax/styles/shThemeEclipse.css"/>
    <script type="text/javascript" src="/components/syntax/scripts/shCore.js"></script>
    <script type="text/javascript" src="/components/syntax/scripts/shBrushAll.js"></script>
    <script type="text/javascript">
	   	SyntaxHighlighter.all();
    </script>
  </head>

  <body>
    <div class="header">
        <% 
        UserService userService = UserServiceFactory.getUserService();
        request.setAttribute("login", userService.isUserLoggedIn());
        %>
    	<c:if test="${!login}">
    		<a href="<%=userService.createLoginURL("/") %>">Sign in</a>
    	</c:if>
    	<c:if test="${login}">
    		<a href="<%=userService.createLogoutURL("/") %>">Sign out</a>
    	</c:if>
    </div>
    
    <div class="body">
	   	<div class="body_top">
	   		<div class="logo">this is logo</div>
	   		<div class="menu">this is menu</div>
	   	</div>
	   	<div class="body_middle">
	   		<div class="inner_body">
	   			<tiles:insert attribute="body"></tiles:insert>
	   		</div>
	   	</div>
	   	<div class="body_below"></div>
   	</div>
    
    <div class="footer">
    	<p>&copy;&nbsp;2010 <a href="/" title="CBlog">CBlog</a> Powered by <a href="http://www.appspot.com">
		<img src="http://code.google.com/appengine/images/appengine-noborder-120x30.gif" alt="Powered by Google App Engine" /></a></p>
    </div>
  </body>
</html>